package com.example.moneybook.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.moneybook.dto.ResponseResult;
import com.example.moneybook.dto.TransferDto;
import com.example.moneybook.pojo.Transfer;
import com.example.moneybook.vo.TransferVo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: 包
 * @Date: 2023/3/1 19:36
 * Description:
 */
public interface TransferService extends IService<Transfer> {

    /**
     * 添加转账记录
     * @param transferDto
     * @return
     */
    ResponseResult addTransfer(TransferDto transferDto);

    /**
     * 获取某个账户的转账记录
     * @param userId
     * @param accountId
     * @return
     */
    List<TransferVo> transferByAccount(String userId, int accountId);

    /**
     * 删除某个账户的转账记录
     * @param userId
     * @param fromId
     * @return
     */
    int delTransferByAcc(String userId, int fromId);
}
